package com.chenix.aicodehelper.Ai;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.Result;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import reactor.core.publisher.Flux;

import java.util.List;

//@AiService
public interface AiCoderHelperService {
    //普通聊天
    @SystemMessage(fromResource = "system.txt")
    String chat(String message);
    //学习报告
    @SystemMessage(fromResource = "system.txt")
    Report chatForReport(String message);
    record Report(String name, List<String> suggestionList) {}

    //返回封装后的结果
    @SystemMessage(fromResource = "system.txt")
    Result<String> chatWithRAG(String message);


    //流式调用
    @SystemMessage(fromResource = "system.txt")
    Flux<String> chatStream(@MemoryId String memoryId, @UserMessage String message);

}
